package com.kingdee.eas.hr.base.app.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

public class CAPropertiseUtil {
	static Properties prop = new Properties();

	public static boolean loadFile(String fileName) {
//			prop.load(CAPropertiseUtil.class.getClassLoader()
//					.getResourceAsStream(fileName));
		InputStream in = CAPropertiseUtil.class.getClassLoader().getResourceAsStream(fileName);
		BufferedReader bf = new BufferedReader(new InputStreamReader(in)); 
		try {
			prop.load(bf);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return true;
	}

	public static String getPropertyValue(String key) {
		return prop.getProperty(key);
	}
}